<?php

namespace app\model\sync_model;

use app\BaseModel;
use app\model\UserModel;
use think\model\relation\BelongsTo;

class SyncMessageDetails extends BaseModel
{
    protected $name = 'sync_message_details';

    /**
     * 关联用户-获取用名称
     * @return BelongsTo
     */
    public function getConsultantName(): BelongsTo
    {
        return $this->belongsTo(UserModel::class,'uid')->bind(['nickname'=>'name']);
    }
}